'use strict';

const monggoose = require('mongoose');

const Schema = monggoose.Schema;

const TeamType = {
    id: Schema.ObjectId,
    name: {
        type: String,
        required: true,
    },
    icon: {
        type: String,
        required: true,
    },
    homeStadium: String,
    foundedYear: Number,
    slogan: String,
    link: String,
};

const TeamSchema = new Schema(TeamType);

module.exports = {
    TeamType,
    TeamSchema,
    TeamModel: monggoose.model('TeamModel', TeamSchema),
};